package com.suao.goods.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.suao.common.annotation.Excel;
import com.suao.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品销售流水对象 suao_goods_sales_info
 *
 * @author tyz
 * @date 2023-02-27
 */
@Data
public class GoodsSalesInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 商品标识 */
    @Excel(name = "商品标识")
    private Long goodsId;
    
    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;
    
    
    /** 单位 */
    @Excel(name = "单位")
    private String unit;

    /** 销售日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "销售日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date salesTime;
    
    /** 销售类型 */
    @Excel(name = "销售类型")
    private Long userType;

    /** 销售总额 */
    @Excel(name = "销售总额")
    private BigDecimal salesTotal;

    
    /** 销售数量 */
    @Excel(name = "销售数量")
    private BigDecimal salesNum;
    
    /** 零售价 */
    @Excel(name = "零售价")
    private BigDecimal retailPrice;

    /** 销售员ID */
    @Excel(name = "销售员ID")
    private Long userId;
    
    /** 销售员*/
     @Excel(name = "销售员")
    private String nickName;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("goodsId", getGoodsId())
            .append("salesTime", getSalesTime())
            .append("salesTotal", getSalesTotal())
            .append("userId", getUserId())
            .append("userType", getUserType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
